﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainingWorkshop.DAL_EF.Translator
{
    public class LevelTranslator
    {
        public static List<TrainingWorkshop.Models.Level> TransfertoModelLevel(List<TrainingWorkshop.DAL_EF.Level> level)
        {
            List<TrainingWorkshop.Models.Level> levelList = new List<Models.Level>();
            foreach (Level levelEntity in level)
            {
                TrainingWorkshop.Models.Level levelModel = new Models.Level();
                levelModel.LevelId = levelEntity.LevelId;
                levelModel.LevelName = levelEntity.LevelName;
                levelList.Add(levelModel);
            }
            return levelList;
        }
        public static List<Level> TransfertoEntityLevel(List<TrainingWorkshop.Models.Level> level)
        {
            List<Level> levelList = new List<Level>();
            foreach (TrainingWorkshop.Models.Level levelModel in level)
            {
                Level levelEntity = new Level();
                levelEntity.LevelId = levelModel.LevelId;
                levelEntity.LevelName = levelModel.LevelName;
                levelList.Add(levelEntity);
            }
            return levelList;
        }
    }
}
